package com.aprivate.kn.ratingsystem.viewUtil;

import android.view.View;
import android.view.ViewGroup;

public class ViewGroupUtils {
    public static View getCurrentView(ViewGroup parent, View child) {
        View levelparent = (View) child.getParent();
        if (parent.indexOfChild(levelparent) > -1) {
            return levelparent;
        } else {
            return getCurrentView(parent, levelparent);
        }
    }
}
